﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using FAS.Core;
using FAS.Core.Repositories;
using FAS.Repositories;
using FAS.Common.Repository.Nhb;

namespace FAS.tests
{
    [TestClass]
    public class NhiTest
    {
        [ClassInitialize]
        public static void IniSessionBuilder(TestContext testContext)
        {
            SessionBuilder.sessionStorage = new WpfSessionStorage();
        }
        [TestMethod]
        public void NhiAddTest()
        {
            Formulaid f = new Formulaid();
            f.Name = "测试";
            f.Description = "值=f*2+pv*2";
            IFormulaidRepository formulaidRepository = new FormulaidRepository();
            formulaidRepository.SaveOrUpdate(f);
            Assert.IsTrue(formulaidRepository.GetAll().Count > 0);
        }
    }
}
